import {createWebHistory,createRouter,createWebHashHistory} from "vue-router"
 const router = createRouter({
    history:createWebHashHistory(),
    // history:createWebHistory(),
    routes:[
        {
            path:'/',
            redirect:"/home"
        },
        {
            path:"/home",
            name:"home",
            component:()=>import(/* webpackChunkName: "home" */'../views/layout/index.vue')
        },
        {
            path:"/sun",
            name:"sun",
            component:()=>import(/* webpackChunkName: "sun" */'../views/sun/index.vue')
        },
        {
            path:"/404",
            name:"404",
            component:()=>import('../views/404/index.vue')
        },
        {
            path:"/:pathMatch(.*)*",
            redirect:"/404"

        }
    ]
})
export default router